<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>Document</title>
    <link rel="stylesheet" href="./css/api.css">
    <style>
		.login-bg {
		    background-image: url(./image/bg.webp);
		    background-size: cover;
		    background-position: center;
		    width: 100vw;
			height:100vh;
		    box-sizing: border-box;
		    padding: 0;
		    -webkit-animation: slideop 5s linear infinite;
		    animation: slideop 5s linear infinite;
		    background-position: 0 bottom;
		}
    </style>
</head>
<body class="login-bg">
	
</body>
<script src="./script/api.js"></script>
<script src="./script/tent/im.js"></script>
<script src="./script/tent/tencentCloudChat.js"></script>
<script src="./script/jquery.js"></script>
<script src="./script/ffkj.js"></script>
<script src="./script/push.js"></script>
<script src="./script/root.js"></script>
<script>
    var uzModuleMeiHu = null;
    apiready = function(){
        uzModuleMeiHu  = api.require('moduleMeiHu');
        addFloatViewClick();
    	var privacy = $api.getStorage('appPrivacy'+api.appVersion);
		if(privacy != 1){
			_listener('privacyAllowed', function() {
				loadRootEvent();
			})
			_openFrame('xieyi',1,1);
			return;
		}
		loadRootEvent()
        // 监听 后端推送过来的 1接听/0挂断 状态
        _listener('returnRequest', function(ret) {
            var data = ret.value;
            if (data.status == 0) {
                $api.setStorage('callStatus', 0); // 不在通话中
                uzModuleMeiHu.closeAll()
                uzModuleMeiHu.removeFloatView()
            }else if (data.status == 2) {
                $api.setStorage('callStatus', 0); // 不在通话中
                uzModuleMeiHu.closeAll()
                uzModuleMeiHu.removeFloatView()
            } else if (data.status == 3) {
                $api.setStorage('callStatus', 0); // 不在通话中
                uzModuleMeiHu.closeAll()
                uzModuleMeiHu.removeFloatView()
            } else if (data.status == 4) {
                $api.setStorage('callStatus', 0); // 不在通话中
                uzModuleMeiHu.closeAll()
                uzModuleMeiHu.removeFloatView()
            }
        })
    }

    function addFloatViewClick(){
        uzModuleMeiHu.addFloatViewClick(function(ret, err){


            var data = ret.detail;
            if(data.event == 'clickGoBack'){
                openBeauty()
            }else if(data.event == 'clickClose'){
                uzModuleMeiHu.closeAll()
                uzModuleMeiHu.removeFloatView()
            }
        })
    }
    function openBeauty(){
        

        _url($api.getStorage('frame0/videochat'), 'frame0/videochat')
    }


</script>
</html>
